package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 支付供应商
 * @TableName channel
 */
@TableName(value ="channel")
@Data
public class Channel implements Serializable {
    /**
     * 通道ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 通道名称
     */
    @TableField(value = "title")
    private String title;

    /**
     * 通道代码
     */
    @TableField(value = "code")
    private String code;

    /**
     * 状态 1 开启 0 关闭
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 充值费率
     */
    @TableField(value = "lowrate")
    private BigDecimal lowrate;

    /**
     * 结算时间 1、D0 2、D1 3、T0 4、T1
     */
    @TableField(value = "accounting_date")
    private Integer accountingDate;

    /**
     * 账户字段
     */
    @TableField(value = "account_fields")
    private String accountFields;

    /**
     * 接口模式 0单独 1轮询
     */
    @TableField(value = "polling")
    private Integer polling;

    /**
     * 更新时间
     */
    @TableField(value = "updatetime")
    private Integer updatetime;

    /**
     * 支付类型 1 微信扫码 2 微信公众号 3 支付宝扫码 4 支付宝手机 5 网银支付 6
     */
    @TableField(value = "paytype")
    private Integer paytype;

    /**
     * 前台展示名称
     */
    @TableField(value = "show_name")
    private String showName;

    /**
     * 接口可用 0通用 1手机 2电脑
     */
    @TableField(value = "is_available")
    private Integer isAvailable;

    /**
     * 字段默认值
     */
    @TableField(value = "default_fields")
    private String defaultFields;

    /**
     * 申请地址
     */
    @TableField(value = "applyurl")
    private String applyurl;

    /**
     * 
     */
    @TableField(value = "is_install")
    private Integer isInstall;

    /**
     * 渠道排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 
     */
    @TableField(value = "is_custom")
    private Integer isCustom;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Channel other = (Channel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getLowrate() == null ? other.getLowrate() == null : this.getLowrate().equals(other.getLowrate()))
            && (this.getAccountingDate() == null ? other.getAccountingDate() == null : this.getAccountingDate().equals(other.getAccountingDate()))
            && (this.getAccountFields() == null ? other.getAccountFields() == null : this.getAccountFields().equals(other.getAccountFields()))
            && (this.getPolling() == null ? other.getPolling() == null : this.getPolling().equals(other.getPolling()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
            && (this.getPaytype() == null ? other.getPaytype() == null : this.getPaytype().equals(other.getPaytype()))
            && (this.getShowName() == null ? other.getShowName() == null : this.getShowName().equals(other.getShowName()))
            && (this.getIsAvailable() == null ? other.getIsAvailable() == null : this.getIsAvailable().equals(other.getIsAvailable()))
            && (this.getDefaultFields() == null ? other.getDefaultFields() == null : this.getDefaultFields().equals(other.getDefaultFields()))
            && (this.getApplyurl() == null ? other.getApplyurl() == null : this.getApplyurl().equals(other.getApplyurl()))
            && (this.getIsInstall() == null ? other.getIsInstall() == null : this.getIsInstall().equals(other.getIsInstall()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getIsCustom() == null ? other.getIsCustom() == null : this.getIsCustom().equals(other.getIsCustom()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getLowrate() == null) ? 0 : getLowrate().hashCode());
        result = prime * result + ((getAccountingDate() == null) ? 0 : getAccountingDate().hashCode());
        result = prime * result + ((getAccountFields() == null) ? 0 : getAccountFields().hashCode());
        result = prime * result + ((getPolling() == null) ? 0 : getPolling().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        result = prime * result + ((getPaytype() == null) ? 0 : getPaytype().hashCode());
        result = prime * result + ((getShowName() == null) ? 0 : getShowName().hashCode());
        result = prime * result + ((getIsAvailable() == null) ? 0 : getIsAvailable().hashCode());
        result = prime * result + ((getDefaultFields() == null) ? 0 : getDefaultFields().hashCode());
        result = prime * result + ((getApplyurl() == null) ? 0 : getApplyurl().hashCode());
        result = prime * result + ((getIsInstall() == null) ? 0 : getIsInstall().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getIsCustom() == null) ? 0 : getIsCustom().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", code=").append(code);
        sb.append(", status=").append(status);
        sb.append(", lowrate=").append(lowrate);
        sb.append(", accountingDate=").append(accountingDate);
        sb.append(", accountFields=").append(accountFields);
        sb.append(", polling=").append(polling);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", paytype=").append(paytype);
        sb.append(", showName=").append(showName);
        sb.append(", isAvailable=").append(isAvailable);
        sb.append(", defaultFields=").append(defaultFields);
        sb.append(", applyurl=").append(applyurl);
        sb.append(", isInstall=").append(isInstall);
        sb.append(", sort=").append(sort);
        sb.append(", isCustom=").append(isCustom);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}